name: "Website Chatbot"
slug: "website-chatbot"
icon: "tool"
category_slugs: ["customer-support", "marketing", "sales", "productivity"]
description: "A chatbot that can answer user's questions based on your own content and can easily be embedded into your website."
provider_slug: "promptly"
pages:
  - title: "Basic"
    description: "Configure your Chatbot"
    input_fields:
      - name: "welcome_message"
        title: "Welcome Message"
        type: "string"
        description: "This is the message the chatbot greets users with"
        path: "config.welcome_message"
      - name: "assistant_image"
        title: "Assistant Image"
        type: "image"
        description: "Icon to show for the messages from assistant"
        path: "config.assistant_image"
  - title: "Data"
    description: "Provide data for your Chatbot"
    input_fields:
      - name: "datasource"
        title: "Datasource"
        type: "datasource"
        description: "Select the data for the chatbot to answer from. Click on the icon to the right to add new data"
        path: "processors[0].config.datasource"
  - title: "Finish"
    description: "Final touches"
    input_fields:
      - name: "window_color"
        title: "Primary Color of Chat Window"
        type: "color"
        description: "Color of the chat window"
        path: "config.window_color"
      - name: "chat_bubble_text"
        title: "App Bubble Text"
        type: "string"
        default: null
        description: "Text to show in the app bubble when embedded in another page. Leave empty to show a chat bubble icon."
        path: "config.chat_bubble_text"
      - name: "chat_bubble_style"
        title: "App Bubble Style"
        type: "text"
        default: null
        description: "CSS style object to apply to the app bubble when embedded in another page. Leave empty to use a chat bubble icon"
        advanced_parameter: true
        path: "config.chat_bubble_style"
app:
  name: "Website Chatbot"
  slug: "website-chatbot"
  description: "A chatbot that can answer user's questions based on your own content and can easily be embedded into your website."
  type_slug: "text-chat"
  config:
    layout: >-
      <pa-layout sx='{"maxWidth": "900px", "margin": "0 auto", "padding":
      "10px"}'>
        <pa-grid container="true" spacing="2" style="width: 100%">
          <pa-grid item="true" xs="12">
            <pa-chat-output sx='{"height": "70vh", "minHeight": "90%"}'/>
          </pa-grid>
          <pa-grid item="true" xs="12">
                  <pa-input-form clearonsubmit="true" />
          </pa-grid>
        </pa-grid>
      </pa-layout>
  input_fields:
    - name: "question"
      title: "Question"
      type: "string"
      description: "Enter your question here"
  output_template:
    markdown: |
      {{_inputs1.answer}}
  processors:
    - id: "_inputs1"
      provider_slug: "promptly"
      processor_slug: "text_chat"
      input: { "question": "{{_inputs0.question}} " }
      config:
        {
          "k": 8,
          "model": "gpt-3.5-turbo",
          "datasource": [],
          "temperature": 0.7,
          "instructions": "You are a chatbot that uses the provided context to answer the user's question.\nIf you cannot answer the question based on the provided context, say you don't know the answer.\nNo answer should go out of the provided input. If the provided input is empty, return saying you don't know the answer.\nKeep the answers terse.",
          "chat_history_limit": 20,
          "system_message_prefix": "You are a helpful chat assistant",
          "use_azure_if_available": true,
          "chat_history_in_doc_search": 0,
        }
